<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-3.3.1.min.js"></script>
</head>
<body>
      这是模板网站

    <table border="1" align="center" width="80%">
         <tr>
             <th>编号</th>
             <th>姓名</th>
             <th>操作</th>
         </tr>

        <tr align="center" th:each="s:${list}">
            <td th:text="${s.id}">1</td>
            <td th:text="${s.name}">张三</td>
            <td>
                <button th:attr="data-id=${s.id}" th:onclick="'go('+${s.id}+')'">删除</button>
            </td>
        </tr>
    </table>



</body>



</html>


<script>
    function go(id) {
       // var id = $(btn).data("id");
        var sex  = [[${sex}]];
        alert(sex);
    }
</script>

